package com.gao.frame.study.shop.user;

import com.gao.frame.study.shop.user.module.entity.CustomerLogin;
import com.gao.frame.study.shop.user.module.mapper.CustomerLoginMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 * @since 2019-09-23 23:15
 */
@SpringBootApplication
@MapperScan("com.gao.frame.study.shop.user.*.mapper")
@EnableDiscoveryClient
public class UserApplication {
    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class,args);
    }
    @RestController
    class UserController{
        @Autowired
        private CustomerLoginMapper mapper;
        @GetMapping("/user/{id}")
        public CustomerLogin user(@PathVariable  Integer id) {

            return mapper.selectById(id);
        }
    }
}